<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <%@include file="/WEB-INF/jsp/comm/head.jsp"%>


</head>
<body>
    <div id="toolbar">
        <button type="button" class="btn btn-success" onclick="prepareGrantUser()"><i class="glyphicon glyphicon-plus"></i>用户授权</button>
    </div>

    <div>
        <table
        id="userTb"
        data-toggle="table"
        data-striped="true"
        data-url="${ctx}/user/user/list"
        data-toolbar="toolbar"
        >
            <thead>
                <tr>
                    <th data-radio="true"></th>
                    <th data-field="mobile">登陆手机</th>
                    <th data-field="name">用户姓名</th>
                    <th data-field="role.roleName">用户角色</th>
                    <th data-field="bm.bmName">所属部门</th>
                    <th data-field="state" data-formatter="state">用户状态</th>
                    <th>操作</th>
                </tr>
            </thead>
    </table>
    </div>
    <div id="grant">
        <table id="roleTb"
               data-toggle="table"
               data-url="${ctx}/role/role/list">
            <thead>
            <tr>
                <th data-radio="true"></th>
                <th data-field="id">编号</th>
                <th data-field="roleName">名称</th>
            </tr>
            </thead>
        </table>
    </div>


<%@include file="/WEB-INF/jsp/comm/foot.jsp"%>

<script>
    
    function state(value,row) {
        return value==1?"启用":"禁用";
    }
    
</script>

</body>
</html>
